#!/usr/bin/python3
# -*- coding: utf-8 -*-
import os

import requests

def get(url):
    res = requests.get(url)
    return res
def write(list, filename):
    with open(filename, 'w', encoding='utf-8') as f:
        for line in list:
            f.write(line + '\n')
def writeStr(str, filename):
    with open(filename, 'w', encoding='utf-8') as f:
        f.write(str)
def main():
    url = 'http://c.biancheng.net/view/5895.html'
    res = get(url)
    res.encoding = 'utf-8'
    # list = res.text.split("\n")
    writeStr(res.text, './index.html')

if (__name__ == '__main__'):
    main()